package com.shujia.day11;

import java.util.Random;

public class RandomDemo1 {
    public static void main(String[] args) {
//        Math.random() [0.0, 1.0)

        Random random = new Random();

//        System.out.println(random.nextInt());

        //1-100
        int i = random.nextInt(100) + 1; // [1,101)
        System.out.println(i);
    }
}
